package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.TEfficAccessRecordsMapper;
import com.ruoyi.system.domain.TEfficAccessRecords;
import com.ruoyi.system.service.ITEfficAccessRecordsService;

/**
 * 有效访问记录Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-30
 */
@Service
public class TEfficAccessRecordsServiceImpl implements ITEfficAccessRecordsService 
{
    @Autowired
    private TEfficAccessRecordsMapper tEfficAccessRecordsMapper;

    /**
     * 查询有效访问记录
     * 
     * @param id 有效访问记录主键
     * @return 有效访问记录
     */
    @Override
    public TEfficAccessRecords selectTEfficAccessRecordsById(Long id)
    {
        return tEfficAccessRecordsMapper.selectTEfficAccessRecordsById(id);
    }

    /**
     * 查询有效访问记录列表
     * 
     * @param tEfficAccessRecords 有效访问记录
     * @return 有效访问记录
     */
    @Override
    public List<TEfficAccessRecords> selectTEfficAccessRecordsList(TEfficAccessRecords tEfficAccessRecords)
    {
        return tEfficAccessRecordsMapper.selectTEfficAccessRecordsList(tEfficAccessRecords);
    }

    /**
     * 新增有效访问记录
     * 
     * @param tEfficAccessRecords 有效访问记录
     * @return 结果
     */
    @Override
    public int insertTEfficAccessRecords(TEfficAccessRecords tEfficAccessRecords)
    {
        tEfficAccessRecords.setCreateTime(DateUtils.getNowDate());
        return tEfficAccessRecordsMapper.insertTEfficAccessRecords(tEfficAccessRecords);
    }

    /**
     * 修改有效访问记录
     * 
     * @param tEfficAccessRecords 有效访问记录
     * @return 结果
     */
    @Override
    public int updateTEfficAccessRecords(TEfficAccessRecords tEfficAccessRecords)
    {
        return tEfficAccessRecordsMapper.updateTEfficAccessRecords(tEfficAccessRecords);
    }

    /**
     * 批量删除有效访问记录
     * 
     * @param ids 需要删除的有效访问记录主键
     * @return 结果
     */
    @Override
    public int deleteTEfficAccessRecordsByIds(Long[] ids)
    {
        return tEfficAccessRecordsMapper.deleteTEfficAccessRecordsByIds(ids);
    }

    /**
     * 删除有效访问记录信息
     * 
     * @param id 有效访问记录主键
     * @return 结果
     */
    @Override
    public int deleteTEfficAccessRecordsById(Long id)
    {
        return tEfficAccessRecordsMapper.deleteTEfficAccessRecordsById(id);
    }
}
